clear;clc;

import Condition.Coil
import Atom.* Atom.Buffer.* VaporCell.*
import Laser.AlkaliLaserBeam

% System
coil = { ...
    Condition.Coil('coilx', 0.0), ...
    Condition.Coil('coily', 0.0), ...
    Condition.Coil('coilz', 0.0001)};

rb=Atom.AlkaliMetal('87Rb', coil);
n2=Atom.Buffer.Nitrogen();
he4=Atom.Buffer.He4();

temperature=350;
gases={ ...
    Gas.Gas(rb, 'vapor', 'temperature', temperature, 'transition', Atom.Transition.D1), ...
    Gas.Gas(n2, 'buffer', temperature, '', 50*Torr2Pa, 'N2'), ...
    Gas.Gas(he4, 'buffer', temperature, '', 700*Torr2Pa) ...
};

radius = 2e-3;
pumpBeam=Laser.AlkaliLaserBeam(1e-8, ...                     % power in [W]
                         rb, Atom.Transition.D1, 0, ... % ref Atom
                         [0 0 1], [1, 1i], radius);       % direction, pol, spot size

system=CellSystem.VacuumCell(gases, pumpBeam, 'vacuum-ground');
